package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Log;
import com.cskaoyan.bean.data.BaseData;
import com.cskaoyan.bean.log.bo.LogReq;
import com.cskaoyan.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @HJL
 */
@RestController
@RequestMapping("admin/log")
public class AdminLogController {
    @Autowired
    private LogService logService;

    /**
     * 分页查询日志
     * @param req
     * @return
     */
    @GetMapping("list")
    public BaseRespVo listLogs(LogReq req) {
        BaseData<Log> baseData = logService.getLogList(req);
        return BaseRespVo.ok(baseData);
    }
}
